import geometrie.Point;
import ihm.ControleurApplication;
import ihm.FenetrePrincipale;
import scene.ModeleMaillage;
import scene.Prism;
import scene.Pyramid;
import scene.Scene;
import vision.AfficheurScene;

/**
 * Main program of the TP: creates the scene and displays it on the screen.  
 * 
 */
public class TPVisu3D {
	/**
	 * Point de lancement de l'application. Utilisation: java TPVisu3D.
	 */
	public static void main(String[] args) {
		Scene scene = creeScene();
		int dimU = 800;
		int dimV = 600;
		// 1 pixel == 0.5 unites dans Ref_Scene (ad hoc)
		double taillePixel = 0.5;

		new FenetrePrincipale(new ControleurApplication(new AfficheurScene(
				scene, dimU, dimV, taillePixel), dimU, dimV));
	}

	/**
	 * Create the scene to be show in the interface. 
	 */
	private static Scene creeScene() {

		Scene scene = new Scene();

		scene.addModele3D(new ModeleMaillage("FichiersTest/temple.off"));
		//scene.addModele3D(new Pyramid(new Point(0, 0, 0), 40, 20, 40));
	//	scene.addModele3D(new Prism(new Point(0, -40, 0), -40, 20, 40));

		return scene;
	}
}
